package com.authine.cloudpivot.ext.enums.order.transfer;


public enum PurchaseRequestEnum {

    /**
     * 采购付款单状态
     */
    ALL(0,"全部"),
    NEW(1, "新建"),
    PAYMENT(2,"待付款"),
    PAYED(3,"财务确认"),
    DISMISSED(4,"业务驳回"),
    FINANCE_DISMISSAL(5,"财务驳回"),
    ABANDON(6,"作废");

    public Integer id;
    public String text;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    private PurchaseRequestEnum(Integer id, String text) {

        this.id = id;
        this.text = text;
    }

    public static PurchaseRequestEnum get(Integer code) {

        for (PurchaseRequestEnum c : PurchaseRequestEnum.values()) {
            if (c.id.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return text;
    }



}
